import { createStore, useStore as baseUseStore, Store } from 'vuex'
import { InjectionKey } from 'vue'
import { getStoreOption } from '@/views/winData/winData'
import { State } from '@/winTypes'
// 窗口的三种状态
// 最大化
export const key: InjectionKey<Store<State>> = Symbol()
export const store = createStore<State>(getStoreOption())
export function useStore() {
  return baseUseStore(key)
}
